package com.pojo;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;

public class User {
    private Integer id;

    @NotEmpty(message = "用户编码不能为空")
    private String code;

    @NotEmpty(message = "用户名不能为空")
    private String name;

    @NotEmpty(message="密码不能为空")
    @Length(min=6,max=16,message="用户密码长度为6-16")
    private String password;

    private Integer role;

    private Boolean status;
    
    

    public User(Integer id, String code, String name, String password, Integer role, Boolean status) {
		super();
		this.id = id;
		this.code = code;
		this.name = name;
		this.password = password;
		this.role = role;
		this.status = status;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

	@Override
	public String toString() {
		return "User [id=" + id + ", code=" + code + ", name=" + name + ", password=" + password + ", role=" + role
				+ ", status=" + status + "]";
	}
    
    
}